	
// KarakterSkala.h : Declaration of the CKarakterSkala

#ifndef __KARAKTERSKALA_H_
#define __KARAKTERSKALA_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CKarakterSkala
class ATL_NO_VTABLE CKarakterSkala : 
	public CComObjectRootEx<CComMultiThreadModel>,
	public CComCoClass<CKarakterSkala, &CLSID_KarakterSkala>,
	public ISupportErrorInfo,
	public IDispatchImpl<IKarakterSkala, &IID_IKarakterSkala, &LIBID_EBASDLLLib>
{
public:
	CKarakterSkala()
	{
		m_pUnkMarshaler = NULL;
	}

DECLARE_REGISTRY_RESOURCEID(IDR_KARAKTERSKALA)
DECLARE_NOT_AGGREGATABLE(CKarakterSkala)
DECLARE_GET_CONTROLLING_UNKNOWN()

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CKarakterSkala)
	COM_INTERFACE_ENTRY(IKarakterSkala)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
	COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
END_COM_MAP()

	HRESULT FinalConstruct()
	{
		return CoCreateFreeThreadedMarshaler(
			GetControllingUnknown(), &m_pUnkMarshaler.p);
	}

	void FinalRelease()
	{
		m_pUnkMarshaler.Release();
	}

	CComPtr<IUnknown> m_pUnkMarshaler;

// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

// IKarakterSkala
public:
	STDMETHOD(SetInfo)();
	STDMETHOD(Slet)();
	STDMETHOD(get_GUID)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(get_Navn)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Navn)(/*[in]*/ BSTR newVal);
	STDMETHOD(put_GUID)(/*[in]*/ BSTR newVal)
	{
		m_guid = newVal;
		return S_OK;
	}
private:
	bstr_t m_guid, m_navn;
};

#endif //__KARAKTERSKALA_H_
